package ma.enim.webapp.action;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class LoginAction extends ActionSupport {
	
	private String userId;
	private String password;
	
	public String execute() throws Exception{

		/*if ("admin".equals(userId) && "admin".equals(password)) {
			java.util.Map session = ActionContext.getContext().getSession();
			session.put("logined","true");*/
            return SUCCESS;
        }
		//else{
			// return ERROR;
		//}
    //}

    public String logout() throws Exception {

		java.util.Map session = ActionContext.getContext().getSession();
		session.remove("logined");
        return SUCCESS;
    }
	
	
	
	
	
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

}
